Ext.define('wmf.model.ec.ec', {
    extend: 'Ext.data.Model',
    fields: [
        { name: 'contactor', type: 'string' },
        { name: 'id', type: 'string' },
        { name: 'ecName', type: 'string' },
        { name: 'name', type: 'string' ,convert: function(v, record){
			return record.data.ecName + '[' + record.data.id + ']';
        }},
        { name: 'ecId', type: 'string' ,convert: function(v, record){
			return record.data.id;
        }},
        { name: 'ecNameOrId', type: 'string' ,convert: function(v, record){
			return record.data.id;
        }},
        { name: 'province', type: 'string' },
        { name: 'industryType', type: 'string' },
        { name: 'constractBeginMonth', type: 'string' },
        { name: 'constractEndMonth', type: 'string' },
        { name: 'paymentType', type: 'string' },
        { name: 'paymentType1', type: 'string' ,convert: function(v, record){
			var value = record.data.paymentType;
			if(value == "1"){
				return "后付";
			}else if(value == "2"){
				return "预付";
			}else{
				return value;
			}
        }},
        { name: 'address', type: 'string' },
        { name: 'status', type: 'string' },
		{ name: 'status1', type: 'string' ,convert: function(v, record){
			var value = record.data.status;
			if(value == "1"){
				return "生效";
			}else{
				return "失效";
			}
        }},
        { name: 'phone', type: 'string' },
        { name: 'email', type: 'string' },
        { name: 'latestOperator', type: 'string' },
        { name: 'latestOperateTime1', type: 'string' ,convert: function(v, record){
			return wmf.data.mydateformat(record.data.latestOperateTime);
        }},
        { name: 'latestOperateTime', type: 'string' }
    ]
});